<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Strict//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
<title>$.post $.get $.ajax(php)</title>
<script src="jquery.js"></script>
<style>
 div{color:red;}
</style>
</head>
<body>
  <input type="text" name="username" id="username">
  <input type="button" value="检验">
  <div></div>
  <script>
    $('input[type=button]').click(function(){
    	$.get('process.php',{'username':$('#username').val()},function(data){
    	 	//alert(data);
    	 	//$('div').html(data);
    	 	if(data=='true'){
    	 		$('div').html('用户， 可以注册');
    	 	}else{
    	 		$('div').html('用户，名不可以是admin');
    	 	}
    	});
    });
  </script>
</body>
</html>